<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>触发BFC的条件</title>
    <style>
        /* 
        触发BFC的条件
        1.根元素html body
        2.浮动元素  float left right
        3.绝对定位 absolute fixed
        4.display table-caption table-cell inline-block flex  grid
        5.overflow hidden auto  scroll
         */
         .float{
             float: left;
             border: 1px solid red;
         }
         .bfc{
             overflow: hidden;
         }
    </style>
</head>
<body>
    <div class="box">content</div>
    <div class="float">float</div>
    <div class="bfc">yuansu</div>
</body>
</html>